<template>
  <div>
    <InnerPageTable class="table" ref="valueSetTable" :config="pageTableConfig">
    </InnerPageTable>
  </div>
</template>

<script>
const columnsFn = () => {
  return [
     {
            title: '操作时间', 
            key: "time",
            width: 180,
       
        },
        {
            title: '更新人',  
            key: "operator",
            width: 150,
           
        },
        {
            title: '操作内容', 
            key: "content",
            // width: 300,
           
        },
  ]
}
import sysConfigApi from '@/api/sysConfig.js'
export default {
  name: 'revisionRecord',
  props: {
    type: {
      type: String,
      default: () => undefined
    },
    reportName: {
      typeof: String,
      default: () => ''
    }
  },
  data() {
    return {
      pageTableConfig: {
        loadDataFn: this.getRevisionRecord,
        columns: columnsFn.bind(this)(),
      }
    }
  },
  created() {
     this.$emit("SetTitle", "操作记录");
     this.$emit("SetPageMinHeight", 200);
     this.$emit("SetPageWidth", 1000);
  },
  mounted() {
    this.$refs['valueSetTable'].load({
      taskCode: this.taskCode,//:"编码",
      logType: this.logType,
      recordId: this.recordId
    })
  },
  methods: {
    getRevisionRecord(tableObj) {
      let { responseProcess, param } = tableObj
      let api = sysConfigApi.autoRefreshRecord
      if (this.type === '2') {
        param.condition['objectType'] = this.reportName
        api = sysConfigApi.permissionRecord
      } else if (this.type === '3') {
        param.condition['objectType'] = this.reportName
        api = sysConfigApi.statisticConfigRecord
      }
      api(param).then(res => {
        let data = res.data.data
        responseProcess(data)
      })
    },
  }
}
</script>
<style lang="less" scoped>
.table {
   min-height: 300px;
}


</style>

